import request from "@/api/request";


export const getServerListApi = (id) => {
    return request.request({
        url: '/data-source/mock/server/info',
        method: 'get',
    })
}


export const stopServerApi = (serverCode) => {
    return request.request({
        url: `/data-source/mock/server/status/_stop/${serverCode}`,
        method: 'put',
    })
}

export const runServerApi = (serverCode) => {
    return request.request({
        url: `/data-source/mock/server/status/_run/${serverCode}`,
        method: 'put',
    })
}

export const runCustomServerApi = (data) => {
    return request.request({
        url: `/data-source/mock/server/status/_run/${serverCode}`,
        method: 'post',
        data: data
    })
}